package com.lq.schoolshop.service.impl;

import com.lq.schoolshop.dao.ShopCarMapper;
import com.lq.schoolshop.pojo.Expand.ShopAndGoods;
import com.lq.schoolshop.pojo.ShopCar;
import com.lq.schoolshop.service.ShopCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author
 * @Date2021/1/12 16:58
 * @Version V1.0
 * 为什么努力？想把钱都赚够，一心跳广场舞曲去。
 **/
@Service
public class ShopCarServiceImpl implements ShopCarService {

    @Autowired(required = false)
    private ShopCarMapper shopCarMapper;


    @Override
    public List<ShopAndGoods> selByAll(int uid) {
        return shopCarMapper.selByAll(uid);
    }

    @Override
    public int insertAll(int uid, int gid, int count) {
        return shopCarMapper.insertAll(uid,gid,count);
    }

    @Override
    public int sqlByGidCount(int gid) {
        return shopCarMapper.sqlByGidCount(gid);
    }

    @Override
    public int updateGoodsCount(int count, int gid) {
        return shopCarMapper.updateGoodsCount(count,gid);
    }

    @Override
    public int deleteorderByAll(int[] array) {
        return shopCarMapper.deleteorderByAll(array);
    }


    @Override
    public List<ShopAndGoods> selByShopId(int[] id) {
        return shopCarMapper.selByShopId(id);
    }

    @Override
    public Integer[] selAllById(Integer[] id) {
        return shopCarMapper.selAllById(id);
    }


}
